// 字典信息
// 字典信息
import request from "@/api/request";

export const search = (data)=>{
    return request({
      url: "/essentialdata/dd/selectAll",
      method: "post",
      data,
    //   headers:"application/x-www-form-urlencoded"
    });
  }

// 获取树形侧边栏内容
// export const classifier = (data)=>{
//     return request({
//       url: "/ddc/selectAllInquire",
//       method: "post",
//       data
//     //   headers:"application/x-www-form-urlencoded"
//     });
//   }


//   新增数据
export const newPoints = (data)=>{
    return request({
      url: "/essentialdata/dd/insert",
      method: "post",
      data,
      headers:{"Content-Type":"application/json;charset=UTF-8"}
    });
  }


  //   删除字典
export const deleteData = (fId)=>{
  return request({
    url: "/essentialdata/dd/delete/"+fId,
    method: "post",
  });
}



  //   编辑字典
  export const uppdata = (data)=>{
    return request({
      url: "/essentialdata/dd/update",
      method: "POST",
      data,
      headers:{"Content-Type":"application/json;charset=UTF-8"}
    });
  }



    //   查询详情
export const searchDetails = (fId)=>{
  return request({
    url: "/essentialdata/dd/selectDetails/"+fId,
    method: "post",
  });
}


// 查询字典分类
export const query_zdcategory = () => {
  return request({
    url: "/essentialdata/dd/selectFDdcTree",
    method: "post",
  });
};


export const search_zdcategory = (fId) => {
    return request({ url: "/essentialdata/ddc/selectDetails/"+fId, method: "post" });
  };
  